SYSTEM AND METHOD FOR VOICE OVER INTERNET PROTOCOL (VoIP) AND FACSIMILE OVER INTERNET PROTOCOL (FoIP) CALLING OVER THE INTERNET

ABSTRACT

A system and method for sending long distance telephone calls over the Internet utilizes cost and quality of service data to optimize system performance and to minimize the cost of completing the calls. The system utilizes a network of gateways connected to the Internet. The gateways receive calls from various service providers and convert the analog calls into data packets which are then placed onto the Internet. Similarly, the gateways take data packets off the Internet, convert the data packets back into analog format, and provide the analog telephone calls to the same or another service provider. Then system periodically checks the quality of communications between each of the gateways, and uses this information, in combination with cost information, to determine how to route the calls over the Internet. Special addressing protocols can be used by a system embodying the invention to reduce or eliminate unnecessary signaling between gateways as call setup procedures are carried out. The system can also use information about calls that has been recorded in more than one location to determine how much to charge for completing a call.

This application claims priority to U.S. Provisional Patent ApplicationSer. No. 60/331,479, filed Nov. 16, 2001, and U.S. Utility applicationSer. No. 10/094,671, filed Mar. 7, 2002, the disclosure of both of whichare hereby incorporated by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The invention relates generally to the field of communications, and morespecifically to a network configured for Voice over Internet Protocol(VoIP) and/or Facsimile over Internet Protocol (FoTP).

2. Background of the Related Art

Historically, most wired voice communications were carried over thePublic Switched Telephone Network (PSTN), which relies on switches toestablish a dedicated circuit between a source and a destination tocarry an analog voice signal. More recently, Voice over InternetProtocol (VoIP) was developed as a means for enabling speechcommunication using digital, packet-based, Internet Protocol (1P)networks such as the Internet. A principle advantage of IP is itsefficient bandwidth utilization. VoIP may also be advantageous where itis beneficial to carry related voice and data communications over thesame channel, to bypass tolls associated with the PSTN, to interfacecommunications originating with Plain Old Telephone Service (POTS) withapplications on the Internet, or for other reasons. As discussed in thisspecification, the problems and solutions related to VoIP may also applyto Facsimile over Internet Protocol (FoIP).

FIG. 1 is a schematic diagram of a representative architecture in therelated art for VoIP communications between originating telephone 100and destination telephone 145. In alternative embodiments, there may bemultiple instances of each feature or component shown in FIG. 1. Forexample, there may be multiple gateways 125 controlled by a singlecontroller 120. There may also be multiple controllers 120 and multiplePSTN's 115. Hardware and software components for the features shown inFIG. 1 are well-known. For example, controllers 120 and 160 may be CiscoSC2200 nodes, and gateways 125 and 135 may be Cisco AS5300 voicegateways.

To initiate a VoIP session, a user lifts a handset from the hook oforiginating telephone 100. A dial tone is returned to the originatingtelephone 100 via Private Branch Exchange (PBX) 110. The user dials atelephone number, which causes the PSTN 115 to switch the call to theoriginating gateway 125, and additionally communicates a destination forthe call to the originating gateway 125. The gateway will determinewhich destination gateway a call should be sent to using a look-up tableresident within the gateway 125, or it may consult the controller 120for this information.

The gateway then attempts to establish a call with the destinationtelephone 145 via the VoIP network 130, the destination gateway 135,signaling lines 155 and the PSTN 140. If the destination gateway andPSTN are capable of completing the call, the destination telephone 145will ring. When a user at the destination telephone 145 lifts a handsetand says “hello?” a first analog voice signal is transferred through thePSTN 140 to the destination gateway 135 via lines 155. The destinationgateway 135 converts the first analog voice signal originating at thedestination telephone 145 into packetized digital data (not shown) andappends a destination header to each data packet. The digital datapackets may take different routes through the VoIP network 130 beforearriving at the originating gateway 125. The originating gateway 125assembles the packets in the correct order, converts the digital data toa second analog voice signal (which should be a “hello?” substantiallysimilar to the first analog signal), and forwards the second analogvoice signal to the originating telephone 100 via lines 155, PSTN 115and PBX 110. A user at the originating telephone 100 can speak to a userat the destination telephone 145 in a similar manner. The call isterminated when the handset of either the originating telephone 100 ordestination telephone 145 is placed on the hook of the respectivetelephone. In the operational example described above, the telephone 105is not used.

In the related art, the controllers 120 and 160 may provide signalingcontrol in the PSTN and a limited means of controlling a gateway at oneend of the call. It will be appreciated by those skilled in the artthat, in some configurations, all or part of the function of thecontrollers 120 and 160 as described above may be embedded into thegateways 125 and 135, respectively.

VoIP in the related art presents several problems for a provider ofnetwork-based voice communication services. For example, because packetsof information follow different routes between source and destinationterminals in an IP network, it is difficult for network serviceproviders to track data and bill for network use. In addition, VoIPnetworks in the related art lack adequate control schemes for routingpackets through PSTNs, gateways and VoIP networks based upon theselected carrier service provider, a desired Quality of Service (QoS),cost, and other factors. Moreover, related art controllers do notprovide sufficient interfaces between the large variety of signalingsystems used in international communications. Other disadvantagesrelated to monitoring and control also exist with present VoIP schemes.

SUMMARY OF THE INVENTION

An object of the invention is to solve at least one or more of the aboveproblems and/or disadvantages in whole or in part and to provide atleast the advantages described hereinafter.

Another object of the invention is to provide an improved ability tomonitor VoIP and FoIP traffic through a network.

Another object of the invention is to provide an improved ability toidentify the best routes for VoIP and FoIP traffic through a networkbased on a variety of considerations.

Another object of the invention is to provide an improved ability toprovision a network in order to direct VoIP and FoIP traffic accordingto the identified best routes.

Another object of the invention is to simplify the generation of billingrecords related to VoIP and FoIP network services.

Another object of the invention is to improve the interface betweennetworks having different signaling systems.

Another object of the invention if to provide improvedacceptance/decline logic for determining whether to route traffic uponreceipt of a routing request.

Another object of the invention is to provide a different quality ofservice to different classes of customers.

Another object of the invention is to provide an improved method formonitoring the quality of service of a VoIP network.

In order to achieve at least the above objectives in whole or in partand in accordance with the purposes of the invention, as embodied andbroadly described, an improved control architecture for VoIP/FoIPcommunications is provided including the features of a control signalinterface to at least one gateway for routing VoIP/FoIP communicationsover an IP network. A gatekeeper may be coupled to the control signalinterface, and control means coupled to the gatekeeper, wherein thecontrol means is configured to receive a VoIP/FoIP routing request,determine a best route through the IP network, provision the IP networkfor the determined best route, and analyze traffic on the IP network.

Additional advantages, objects, and features of the invention will beset forth in part in the description which follows and in part willbecome apparent to those having ordinary skill in the art uponexamination of the following or may be learned from practice of theinvention. The objects and advantages of the invention may be realizedand attained as particularly pointed out in the appended claims.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention will be described in detail with reference to thefollowing drawings in which like reference numerals refer to likeelements, and wherein:

FIG. 1 is a schematic diagram of a system architecture providing VoIPcommunications, according to the background;

FIG. 2 is a schematic diagram of a system architecture providingVoIP/FoIP communications, according to a preferred embodiment of theinvention;

FIG. 3 is a schematic diagram of a system architecture providingimproved control for VoIP communications, according to a preferredembodiment of the invention;

FIG. 4 is a flow diagram illustrating a method for routing control,according to a preferred embodiment of the invention;

FIG. 5 is a flow diagram illustrating a method for maintaining a callstate, according to a preferred embodiment of the invention;

FIG. 6 is a sequence diagram illustrating a method for communicatingbetween functional nodes of a VoIP network, according to a preferredembodiment of the invention;

FIG. 7 is a flow diagram illustrating a method for billing in a VoIPnetwork environment, according to a preferred embodiment of theinvention;

FIG. 8 is a flow diagram illustrating a three level routing method,according to a preferred embodiment of the invention;

FIG. 9 is a flow diagram illustrating a method for determining whetherto accept or decline a request for call completion, according to apreferred embodiment of the invention;

FIG. 10 is a schematic diagram of a system architecture embodying theinvention;

FIG. 11 is a diagram of a matrix illustrating a method for organizingquality of service data for communications paths between gateways;

FIGS. 12A and 12B are flow diagrams of alternate methods of obtainingquality of service data for alternate communications paths;

FIG. 13 is a flow diagram of a method for making routing decisionsaccording to a preferred embodiment of the present invention;

FIG. 14 is a schematic diagram of a system architecture for routingtraffic over the Internet, according to a preferred embodiment of thepresent invention.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

A system embodying the invention is depicted in FIG. 2. The systemincludes telephones 100/105 connected to a private branch exchange (PBX)110. The PBX, in turn, is connected to the PSTN 115. In addition,telephones 102 may be coupled to a local carrier 114, which in turnroutes long distance calls to one or more long distance serviceproviders 117. Those skilled in the art will recognize that calls couldalso originate from cellular telephones, computer based telephones,and/or other sources, and that those calls could also be routed throughvarious carriers and service providers. Regardless of where the callsare originating from, they are ultimately forwarded to an originatinggateway 125/126.

The originating gateways 125/126 function to convert an analog call intodigital packets, which are then sent via the Internet 130 to adestination gateway 135/136. In some instances, the gateways may receivea call that has already been converted into a digital data packetformat. In this case, the gateways will function to communicate thereceived data packets to the proper destination gateways. However, thegateways may modify the received data packets to include certain routingand other formatting information before sending the packets on to thedestination gateways.

The gateways 125/126/135/136 are coupled to one or more gatekeepers205/206. The gatekeepers 205/206 are coupled to a routing controller200. Routing information used to inform the gateways about where packetsshould be sent originates at the routing controller.

One of skill in the art will appreciate that although a single routingcontroller 200 is depicted in FIG. 2, a system embodying the inventioncould include multiple routing controllers 200. In addition, one routingcontroller may be actively used by gatekeepers and gateways to providerouting information, while another redundant routing controller may bekept active, but unused, so that the redundant routing controller canstep in should the primary routing controller experience a failure. Aswill also be appreciated by those skilled in the art, it may beadvantageous for the primary and redundant routing controllers to belocated at different physical locations so that local conditionsaffecting the primary controller are not likely to also result infailure of the redundant routing controller.

In a preferred embodiment of the invention, as depicted in FIG. 2, thedigital computer network 130 used to communicate digital data packetsbetween gateways may be compliant with the H.323 recommendation from theInternational Telecommunications Union (ITU). Use of H.323 may beadvantageous for reasons of interoperability between sending andreceiving points, because compliance with H.323 is not necessarily tiedto any particular network, platform, or application, because H.323allows for management of bandwidth, and for other reasons. Thus, in apreferred embodiment, one function of the originating gateways 125 and126 and the terminating gateways 135 and 136 may be to provide atranslation of data between the PSTN's 115/135 and the H.323-based VoIPnetwork 130. Moreover, because H.323 is a framework document, H.225protocol may be used for communication and signaling between thegateways 125/126 and 135/136, RTP protocol may be used for audio databetween the gateways 125/126 and 135/136, and RAS (Registration,Admission, and Status) protocol may be used in communications with thegatekeepers 205/206.

According to the invention, the gatekeeper 205 may perform admissioncontrol, address translation, call signaling, call management, or otherfunctions to enable the communication of voice and facsimile trafficover the PSTN networks 115/140 and the VoIP network 130. The ability toprovide signaling for networks using Signaling System No. 7 (SS7) andother signaling types may be advantageous over network schemes that relyon gateways with significantly less capability. For example, related artgateways not linked to the gatekeepers of the present invention may onlyprovide signaling for Multi-Frequency IF), Integrated Services DigitalNetwork (ISDN), or Dual Tone Multi-Frequency (DTMF).

According to a preferred embodiment of the present invention, thegatekeeper 205 may further provide an interface between differentgateways, and the routing controller 200. The gatekeeper 205 maytransmit routing requests to the routing controller 200, receive anoptimized route from the routing controller 200, and execute the routeaccordingly.

Persons skilled in the art of communications will recognize thatgatekeepers may also communicate with other gatekeepers to manage callsoutside of the originating gatekeeper's zone. Additionally, it may beadvantageous to have multiple gatekeepers linking a particular gatewaywith a particular routing controller so that the gatekeepers may be usedas alternates, allowing calls to continue to be placed to all availablegateways in the event of failure of a single gatekeeper. Moreover,although the gatekeeping function may be logically separated from thegateway function, embodiments where the gatekeeping and gatewayfunctions are combined onto a common physical host are also within thescope of the invention.

In a system embodying the present invention, as shown in FIG. 2, arouting controller 200 is logically coupled to gateways 125/126 and135/136 through gatekeepers 205/206. The routing controller 200 containsfeatures not included in the prior art signaling controllers 120 and 160of the prior art systems described above, as will be described below.Routing controller 200 and gatekeepers 205/206 may be hosted on one ormore network based servers which may be or include, for instance, aworkstation running the Microsoft Windows™ NT™, Windows™2000, Unix,Linux, Xenix, IBM AIX™, Hewlett-Packard UX™, Novell Netware™, SunMicrosystems Solaris™, OS/2™, BeOS™, Mach, Apache, OpenStep™ or otheroperating system or platform. Detailed descriptions of the functionalportions of a typical routing controller embodying the invention isprovided below.

As indicated in FIG. 3, a routing controller 200 may include a routingengine 305, a Call Detail Record (CDR) engine 325, a traffic database330, a traffic analysis engine 335, a provisioning engine 340, and aprovisioning database 345. The routing engine 305, CDR engine 325,traffic analysis engine 335, and provisioning engine 340 may exist asindependent processes and may communicate to each other through standardinterprocess communication mechanisms.

In alternative embodiments, the routing engine 305, Call Detail Record(CDR) engine 325, traffic database 330, traffic analysis engine 335,provisioning engine 340, or provisioning database 345 may be duplicatedto provide redundancy. For instance, two CDR engines 325 may function ina master-slave relationship to manage the generation of billing data.

The routing engine 305 may include a communications layer 310 tofacilitate an interface between the routing engine 305 and thegatekeepers 205/206. Upon receipt of a routing request from agatekeeper, the routing engine 305 may determine the best routes forVoIP traffic based upon one or more predetermined attributes such as theselected carrier service provider, time of day, a desired Quality ofService (QoS), cost, or other factors. The routing information generatedby the routing engine 305 could include a destination gateway address,and/or a preferred Internet Service Provider to use to place the calltraffic into the Internet. Moreover, in determining the best route, therule engine 315 may apply one or more exclusionary rules to candidateroutes, based upon known bad routes, provisioning data from provisioningdatabase 345, or other data.

The routing engine 305 may receive more than one request to route asingle call. For example, when a first routing attempt was declined bythe terminating gateway, or otherwise failed to result in a connection,or where a previous routing attempt resulted in a disconnect other thana hang-up by the originator or recipient, then the routing engine mayreceive a second request to route the same call. To provide redundancy,the routing engine 305 may generate alternative routes to a particularfar-end destination. In a preferred embodiment of the invention, whenthe routing engine receives a routing request, the routing engine willreturn both preferred routing information, and alternative routinginformation. In this instance, information for at least one next-bestroute will be immediately available in the event of failure of thepreferred route. In an alternative embodiment, routing engine 305 maydetermine a next-best route only after the preferred route has failed.An advantage of the latter approach is that routing engine 305 may beable to better determine the next best route with the benefit ofinformation concerning the most recent failure of the preferred route.

To facilitate alternative routing, and for other reasons, the routingengine 305 may maintain the state of each VoIP call in a call statelibrary 320. For example, routing engine 305 may store the state of acall as “set up,” “connected,” “disconnected,” or some other state.

Routing engine 305 may further format information about a VoIP call suchas the originator, recipient, date, time, duration, incoming trunkgroup, outgoing trunk group, call states, or other information, into aCall Detail Record (CDR). Including the incoming and outgoing trunkgroup information in a CDR may be advantageous for billing purposes overmerely including IP addresses, since TP addresses may change or behidden, making it difficult to identify owners of far-end networkresources. Routing engine 305 may store CDR's in a call state library320, and may send CDR's to the CDR engine 325 in real time, at thetermination of a call, or at other times.

The CDR engine 325 may store CDR's to a traffic database 330. Tofacilitate storage, the CDR engine 325 may format CDR's as flat files,although other formats may also be used. The CDR's stored in the trafficdatabase 330 may be used to generate bills for network services. The CDRengine 325 may also send CDR's to the traffic analysis engine 335.

Data necessary for the billing of network services may also be stored ina Remote Authentication Dial-In User Service (RADIUS) server 370. TheRADIUS server 370 may also directly communicate with a gateway 125 toreceive and store data such as incoming trunk group, call duration, andIP addresses of near-end and far-end destinations. The CDR adapter 375may read data from both the traffic database 330 and the RADIUS server370 to create a final CDR. The merged data supports customer billing,advantageously including information which may not be available fromRADIUS server 370 alone, or the traffic database 330 alone.

The traffic analysis engine 335 may collect CDR's, and may automaticallyperform traffic analysis in real time, near real time, or after apredetermined delay. In addition, traffic analysis engine 335 may beused to perform post-traffic analysis upon user inquiry. Automatic oruser-prompted analysis may be performed with reference to apredetermined time period, a specified outgoing trunk group, calls thatexceed a specified duration, or according to any other variable(s)included in the CDR's.

The provisioning engine 340 may perform tasks necessary to routeparticular calls over the Internet. For example, the provisioning engine340 may establish or modify client account information, authorize a longdistance call, verify credit, assign phone numbers where the destinationresides on a PSTN network, identify available carrier trunk groups,generate routing tables, or perform other tasks. In one embodiment ofthe invention, provisioning may be performed automatically. In anotherembodiment, provisioning may be performed with user input. Hybridprovisioning, that is, a combination of automated and manualprovisioning, may also be performed. The provisioning engine 340 mayfurther cause provisioning data to be stored in a provisioning database345.

Client workstations 350 and 360 may be coupled to routing controller 200to provide a user interface. As depicted in FIG. 3, the client(s) 350may interface to the traffic analysis engine 335 to allow a user tomonitor network traffic. The client(s) 360 may interface to theprovisioning engine 340 to allow a user to view or edit provisioningparameters. In alternative embodiments, a client may be adapted tointerface to both the traffic analysis engine 335 and provisioningengine 340, or to interface with other features of routing controller200.

In a system embodying the invention, as shown in FIG. 2, the gateways125/126 would first receive a request to set up a telephone call fromthe PSTN, or from a Long Distance Provider 117, or from some othersource. The request for setting up the telephone call would typicallyinclude the destination telephone number. In order to determine whichdestination gateway should receive the packets, the gateway wouldconsult the gatekeeper.

The gatekeeper 205, in turn may consult the routing controller 200 todetermine the most appropriate destination gateway. In some situations,the gatekeeper may already have the relevant routing information. In anyevent, the gatekeeper would forward the routing information to theoriginating gateway 125/126, and the originating gateway would then sendthe appropriate packets to the appropriate destination gateway. Asmentioned previously, the routing information provided by the gatekeepermay include just a preferred destination gateway, or it may include boththe preferred destination gateway information, and information on one ormore next-best destination gateways. The routing information may alsoinclude a preferred route or path onto the Internet, and one or morenext-best route. The routing information may further include informationabout a preferred Internet Service Provider.

FIG. 4 is a flow chart illustrating a method embodying the invention forusing the routing controller 200. In step 400, the routing controller200 receives a routing request from either a gatekeeper, or a gateway.In step 405, a decision is made as to whether provisioning data isavailable to route the call. If the provisioning data is not available,the process advances to step 410 to provision the route, then to step415 for storing the provisioning data before returning to decision step405.

If, on the other hand, if it is determined in step 405 that provisioningdata is available, then the process continues to step 420 for generatinga route. In a preferred embodiment of the invention, step 420 may resultin the generation of information for both a preferred route, and one ormore alternative routes. The alternative routes may further be rankedfrom best to worst.

The routing information for a call could be simply informationidentifying the destination gateway to which a call should be routed. Inother instances, the routing information could include informationidentify the best Internet Service Provider to use to place the calltraffic onto the Internet. In addition, the routing controller may knowthat attempting to send data packets directly from the originatinggateway to the destination gateway is likely to result in a failed call,or poor call quality due to existing conditions on the Internet. Inthese instances, the routing information may include information thatallows the data packets to first be routed from the originating gatewayto one or more interim gateways, and then from the interim gateways tothe ultimate destination gateway. The interim gateways would simplyreceive the data packets and immediately forward the data packets on tothe ultimate destination gateway.

Step 420 may also include updating the call state library, for examplewith a call state of “set up” once the route has been generated. Next, aCDR may be generated in step 425. Once a CDR is available, the CDR maybe stored in step 430 and sent to the traffic analysis engine in step435. In one embodiment, steps 430 and 435 may be performed in parallel,as shown in FIG. 4. In alternative embodiments, steps 430 and 435 may beperformed sequentially. In yet other embodiments, only step 430 or only435 may be performed.

FIG. 5 is a flow diagram illustrating a method for maintaining a callstate, which may be performed by routing engine 305. After starting instep 500, the process may determine in step 505 whether a route requesthas been received from a gatekeeper or other source. If a routingrequest has not been received, the process may advance to a delay step510 before returning to decision step 505. If, however, it is determinedin step 505 that a route request has been received, then a call statemay be set to “set up” in step 515.

The process of FIG. 5 may then determine in step 520 whether a connectmessage has been received from a gatekeeper or other source. If aconnect message has not been received, the process may advance to delaystep 525 before returning to decision step 520. If, however, it isdetermined in step 520 that a connect message has been received, then acall state may be set to “connected” in step 530.

The process of FIG. 5 may then determine in step 535 whether adisconnect message has been received from a gate keeper or other source.If a disconnect message has not been received, the process may advanceto delay step 540 before returning to decision step 535. If, however, itis determined in step 535 that a disconnect message has been received,then a call state may be set to “disconnected” in step 545 before theprocess ends in step 550.

The process depicted in FIG. 5 will operate to keep the call state forall existing calls up to date to within predetermined delay limits. Inalternative embodiments of the invention, the call state monitoringprocess can monitor for other call states such as “hang-up,” “busy,” orother call states not indicated above. Moreover, monitoring for othercall states may be instead of, or in addition to, those discussed above.Further, in one embodiment, monitoring could be performed in parallel,instead of the serial method illustrated in FIG. 5.

FIG. 6 discloses a sequence of messages between an originating gateway,a routing engine, a call state library, and a destination gateway,according to a preferred embodiment of the invention. In operation ofthe network, the originating gateway may send a first request forrouting information, in the form of a first Admission Request (ARQ)message, to a routing engine within a routing controller. The requestwould probably be passed on through a gatekeeper logically positionedbetween the gateway and the routing engine in the routing controller.

Upon receipt of the routing request, the routing engine may store aset-up state in call state library. The routing engine may thendetermine a best route based upon one or more predetermined attributessuch as the selected carrier service provider, a desired Quality ofService (QoS), cost, or other factors. The routing engine may then sendinformation pertaining to the best route to the originating gateway,possibly via a gatekeeper, as a first ARQ response message. The gatewaywould then initiate a first call to a destination gateway using theinformation contained within the response message. As shown in FIG. 6,the destination gateway may return a decline message to the originatinggateway.

When the originating gateway receives a decline message, the gateway maysend a second request for routing information, in the form of a secondARQ message, to routing engine. Routing engine may recognize the call asbeing in a set up state, and may determine a next best route forcompletion of the call. Routing engine may then send a second ARQresponse message to the originating gateway. The originating gateway maythen send a second call message to the same or a newly selecteddestination gateway using the next best route. In response to the secondcall message, the destination gateway may return a connect message tothe originating gateway.

The routing engine may use a conference ID feature of the H.323protocol, which is unique to every call, in order to keep track ofsuccessive routing attempts. Thus, upon receiving a first ARQ for aparticular call, routing engine may respond with a best route; uponreceiving a second ARQ associated with the same call, routing engine mayrespond with the second best route. If the second call over the nextbest route does not result in a connection, the originating gateway maysend a third ARQ message to routing engine, and so on, until an ARQresponse message from routing engine enables a call to be establishedbetween the originating gateway and a destination gateway capable ofcompleting the call to the called party.

In alternative embodiments of the invention, the initial ARQ responsefrom the routing engine to the originating gateway may includeinformation about the best route, and one or more next-best routes. Inthis instance, when a call is declined by one terminating gateway, theoriginating gateway can simply attempt to route the call using thenext-best route without the need to send additional queries to therouting engine.

Once the originating gateway receives a connect message from adestination gateway, the originating gateway may send an InformationRequest Response (IRR) message to the routing engine to indicate theconnect. In response, the routing engine may store a connected statemessage to the call state library.

After a call is connected, a call may become disconnected. A disconnectmay occur because a party has hung up, because of a failure of a networkresource, or for other reasons. In this instance, destination gatewaymay send a disconnect message to the originating gateway. In response,originating gateway may send a Disengage Request (DRQ) message to therouting engine. The routing engine may then update the call state bystoring a disconnected state status in the call state library.

FIG. 7 illustrates a billing process which exploits CDR data, accordingto a preferred embodiment of the invention. In step 700, data may beread from a traffic database which is part of the routing controllershown in FIG. 3, or which is a part of some other routing system. Instep 705, gateway records may be read from a RADIUS server, as alsoillustrated in FIG. 3, or from some other source of gateway data. Instep 710, data from the two sources is reconciled by first matching upthe information for particular calls from the two sources. Informationsuch as date, time, origination point and destination point and/orconference identifier can be used to match up information on aparticular call that has been stored in two different locations.

Advantageously, CDR data from the traffic database or the routingcontroller, or other routing system, may provide outbound trunk groupand termination trunk group information used for billing which may notbe available from the gateway records read in step 705. The processwould then create a final CDR for individual calls in step 715, andcustomer billing may be generated by a billing utility (not shown in theFigures) in step 720. The process of generating a final CDR may utilizepieces of information gathered from the multiple different sources.Also, when the same type of information for a call is recorded in twoplaces, there may be rules for determining which source to use, or theinformation may be merged through some sort of averaging process andcalculation process to arrive at a final value.

The final CDR for a call could include information identifying callstatus information, the start date and time, the inbound trunk group,the inbound original DNIS, the inbound translated DNIS, the outboundtrunk group, the outbound translated DNIS, the inbound original ANI, theinbound translated ANI, the outbound translated ANI, the duration of thecall, the number of re-routings necessary to set the call up, adisconnect cause code number, gateway IP addresses, and a re-route IDnumber.

FIG. 8 is a flow diagram illustrating a method, according to a preferredembodiment of the invention, for generating routing information inresponse to a routing request. As shown in FIG. 8, when a routingcontroller (or a gatekeeper) receives a routing request from a gateway,the method first involves selecting a destination carrier that iscapable of completing the call to the destination telephone in step 802.In some instances, there may be only one destination carrier capable ofcompleting the call to the destination telephone. In other instances,multiple destination carriers may be capable of completing the call. Inthose instances where multiple carriers are capable of completing thecall, it is necessary to initially select one destination carrier. Ifthe call is completed on the first attempt, that carrier will be used.If the first attempt to complete the call fails, the same or a differentcarrier may ultimately be used to complete the call.

Where there are multiple destination carriers capable of completing thecall, the selection of a particular destination carrier may be based onone or more considerations including the cost of completing the callthrough the destination carriers, the quality of service offered by thedestination carriers, or other considerations. The destination carriermay be selected according to other business rules including, forexample, an agreed upon volume or percentage of traffic to be completedthrough a carrier in a geographic region. For instance, there may be anagreement between the system operator and the destination carrier thatcalls for the system operator to make minimum daily/monthly/yearlypayments to a destination carrier in exchange for the destinationcarrier providing a predetermined number of minutes of service. In thosecircumstances, the system operator would want to make sure that thedestination carrier is used to place calls for at least thepredetermined number of minutes each day/month/year before routing callsto other destination carriers to ensure that the system operator derivesthe maximum amount of service from the destination carrier in exchangefor the minimum guaranteed payment. Business rules taking onto accountthese and other similar types of considerations could then be used todetermine which destination carrier to use.

Once the destination carrier has been selected, the method would includeidentifying an IP address of a destination gateway connected to thedestination carrier and capable of passing the call on to thedestination carrier. The destination gateway could be operated by thesystem operator, or by the destination carrier, or by a third party.Typically, a table would be consulted to determine which destinationgateways correspond to which destination carriers and geographiclocations.

Often there may be multiple destination gateways capable of completing acall to a particular destination carrier. In this situation, the step ofdetermining the IP address could include determining multipledestination IP addresses, each of which correspond to destinationgateways capable of completing the call to the destination carrier.Also, the IP address information may be ranked in a particular order inrecognition that some destination gateways may offer more consistent orsuperior IP quality. Also, if two or more destination gateways capableof completing a call to a destination carrier are operated by differentparties, there may be cost considerations that are also used to tank theIP address information. Of course, combinations of these and otherconsiderations could also be used to select particular destinationgateways, and to thus determine the IP address(s) to which data packetsshould be sent.

In some embodiments of the invention, determining the IP address(s) ofthe terminating gateway(s) may be the end of the process. This wouldmean that the system operator does not care which Internet ServiceProvider (IsP) or which route is used to place data traffic onto theInternet. In other instances, the method would include an additionalstep, step 806, in which the route onto the Internet and/or the ISPwould then be selected. The selection of a particular ISP may be basedon a quality of service history, the cost of carrying the data, orvarious other considerations. The quality of service history may takeinto account packet loss, latency and other IP based considerations.Also, one ISP may be judged superior at certain times of the day/week,while another ISP may be better at other times. As will be described inmore detail below, the system has means for determining the quality ofservice that exists for various routes onto the Internet. Thisinformation would be consulted to determine which route/ISP should beused to place call data onto the Internet. Further, as mentioned above,in some instances, the routing information may specify that the calldata be sent from the originating gateway to an interim gateway, andthen from the interim gateway to the destination gateway. This couldoccur, for example, when the system knows that data packets placed ontothe Internet at the originating gateway and addressed directly to thedestination gateway are likely to experience unacceptable delays orpacket loss.

In some instances, the quality of service can be the overridingconsideration. In other instances, the cost may be the primaryconsideration. These factors could vary client to client, and call tocall for the same client.

For example, the system may be capable of differentiating betweencustomers requiring different call quality levels. Similarly, even forcalls from a single customer, the system may be capable ofdifferentiating between some calls that require high call quality, suchas facsimile transmissions, and other calls that do not require a highcall quality, such as normal voice communications. The needs and desiresof customers could be determined by noting where the call originates, orby other means. When the system determines that high call quality isrequired, the system may eliminate some destination carriers,destination gateways, and ISPs/routes from consideration because they donot provide a sufficiently high call quality. Thus, the system may makerouting decisions based on different minimum thresholds that reflectdifferent customer needs.

FIG. 9 is a flow diagram illustrating a method embodying the inventionfor determining whether to accept or decline a request for callcompletion received from the PSTN, a long distance carrier, or someother source. The process begins with receipt of a request for callcompletion in step 902. Thereafter, in step 904, the system woulddetermine the price offered by a requesting carrier for completing thecall. This could be done with reference to look up tables, or therequest itself could specify the price offered to complete the call.This represents the payment that the system will receive for completingthe call. This can be expressed simply in cents per minute, or in somemore complex fashion that represents a minimum payment for a first timeperiod, and some additional payment for each additional minute after thefirst time period.

The method would then proceed to step 906, where the cost required tocomplete the call would be determined. The determination in step 906 maybe based, at least in part, on a destination, a time of day, and apredetermined quality of service for the traffic. Also, if there aremultiple ways to complete the call, this step could involve determiningmultiple different completion costs, each of which may depend on thedestination carrier used, the destination gateways used and the ISP thatis used. Until a call setup is attempted, the system may not know whatthe actual cost to complete the call will be. One of skill in the artwill appreciate that steps 904 and 906 could be performed in any order,or simultaneously.

In step 908, the system would then calculate a margin for completing thecall, or a difference between the offered price and the cost to competethe call. If the cost of completing the call is greater than the priceoffered, the margin will be a negative number.

In step 909 the method determines whether the margin is greater than aminimum threshold. The threshold may reflect a minimum amount of moneythat must be made on the call to justify completing the call. Thethreshold may, in fact, be zero. If the margin is greater than thethreshold, the method proceeds to step 911, and the call is accepted andcompleted. In some embodiments of the invention, this will be the end ofthe process, and if the result of the comparison in step 909 indicatesthat the margin is below the threshold, the call will be declined.

In other embodiments of the invention, if the result of the comparisonin step 909 indicates that the margin is below the threshold, the methodwill include an additional decision step. In these embodiments, in step910, the system will determine whether there is some other reason foraccepting the call. Other reasons could include business considerationsthat devolve from contracts the service provider has with othercarriers. For instance, if the system operator has agreed to provide acertain minimum amount of traffic to a destination service provider, thesystem may decide to accept and complete a call, even when it is notprofitable to do so, so that the minimum traffic obligations can besatisfied. Other similar considerations may also come into play.

If the result of the decision in step 910 is that the call should beaccepted for other reasons, the method proceeds to step 911, and thecall is accepted and completed. If the result of the decision in step910 is to decline the call, the method ends at step 912.

As explained above, when a routing controller receives a routingrequest, the routing controller returns routing information to anoriginating gateway which tells the originating gateway whichdestination gateway should receive the data packets that comprise atelephone call. As also explained above, the cost of sending a callthrough a particular destination service provider and/or to a particulardestination gateway are factors in deciding how the call should berouted. The estimated IP quality for the route is also a factor used indeciding how to route the call. Methods embodying the invention fordetermining or estimating the IP quality of various routes will now bedescribed.

FIG. 10 shows a conceptual diagram of four gateways with access to theInternet. Gateway A can reach Gateways B and C via the Internet. GatewayC can reach Gateway D via the Internet, and Gateway B via an externalconnection. Due to Internet conditions, it will often be the case thatcertain Gateways, while having access to the Internet, cannot reliablysend data packets to other gateways connected to the Internet. Thus,FIG. 10 shows that Gateway C cannot reach Gateways B or A through theInternet. This could be due to inordinately long delays in sending datapackets from Gateway C to Gateways A and B, or for other reasons.

The gateways illustrated in FIG. 10 could be gateways controlled by thesystem operator. Alternatively, some of the gateways could be maintainedby a destination carrier, or a third party. As a result, the gatewaysmay or may not be connected to a routing controller through agatekeeper, as illustrated in FIG. 2. In addition, some gateways mayonly be capable of receiving data traffic and passing it off to a localor national carrier, while other gateways will be capable of bothreceiving and originating traffic.

Some conclusions logically flow from the architecture illustrated inFIG. 10. For instance, Gateway B can send data traffic directly toGateway D through the Internet, or Gateway B could choose to send datato Gateway D by first sending the traffic to Gateway A, and then havingGateway A forward the traffic to Gateway D. In addition, Gateway B couldsend the traffic to Gateway C via some type of direct connection, andthen have Gateway C forward the data on to Gateway D via the Internet.

The decision about how to get data traffic from one gateway to anotherdepends, in part, on the quality of service that exists between thegateways. The methods embodying the invention that are described belowexplain how one can measure the quality of service between gateways, andthen how the quality measurements can be used to make routing decisions.

As is well known in the art, a first gateway can “ping” a secondgateway. A “ping” is a packet or stream of packets sent to a specifiedIP address in expectation of a reply. A ping is normally used to measurenetwork performance between the first gateway and the second gateway.For example, pinging may indicate reliability in terms of a number ofpackets which have been dropped, duplicated, or re-ordered in responseto a pinging sequence. In addition, a round trip time or average roundtrip time can provide a measure of system latency.

In some embodiments of the invention, the quality of servicemeasurements may be based on an analysis of the round trip of a ping. Inother embodiments, a stream of data packets sent from a first gateway toa second gateway could simply be analyzed at the second gateway. Forinstance, numbered and time-stamped data packets could be sent to thesecond gateway, and the second gateway could determine system latencyand whether packets were dropped or reordered during transit. Thisinformation could then be forwarded to the routing controller so thatthe information about traffic conditions between the first and secondgateways is made available to the first gateway.

A system as illustrated in FIG. 10 can use the data collected throughpings to compare the quality and speed of a communication passingdirectly between a first gateway and a second gateway to the quality andspeed of communications that go between the first and second gatewaysvia a third or intermediate gateway. For instance, using the systemillustrated in FIG. 10 as an example, the routing controller could holdinformation about traffic conditions directly between Gateway B andGateway D, traffic conditions between Gateway B and Gateway A, andtraffic conditions between Gateway A and Gateway D. If Gateway B wantsto send data packets to Gateway D, the routing controller could comparethe latency of the route directly from Gateway B to Gateway D to thecombined latency of a route that includes communications from Gateway Bto Gateway A and from Gateway A to Gateway D. Due to local trafficconditions, the latency of the path that uses Gateway A as an interimGateway might still be less than the latency of the direct path fromGateway B to Gateway D, which would make this route superior.

In methods embodying the invention, each gateway capable of directlyaccessing another gateway via the Internet will periodically ping eachof the other gateways. The information collected from the pings is thengathered and analyzed to determine one or more quality of serviceratings for the connection between each of the gateways. The quality ofservice ratings can then be organized into tables, and the tables can beused to predict whether a particular call path is likely to provide agiven minimum quality of service.

A quality of service measure would typically be calculated using the rawdata acquired through the pinging process. As is well known to those ofskill in the art, there are many different types of data that can bederived from the pinging itself, and there is an almost infinite varietyof ways to combine this data to calculate different quality of servicemeasures.

FIG. 11 is a diagram of a matrix of quality of service data thatindicates the quality of service measured between 10 different gateways,gateways A-J. This table is prepared by having each of the gateways pingeach of the other gateways. The data collected at a first gateway isthen collected and used to calculate a quality of rating between thefirst gateway and each of the other gateways. A similar process ofcollection and calculation occurs for each of the other gateways in thesystem. The calculated quality of service values are then inserted intothe matrix shown in FIG. 11. For instance, the quality measure value atthe intersection of row A and column D is 1.8. Thus, the value of 1.8represents the quality of service for communications between Gateways Aand D. When an X appears in the matrix, it means that no communicationsbetween the row and column gateways was possible the last time the pingswere collected.

Although only a single value is shown in the matrix illustrated in FIG.11, multiple quality of service values could be calculated forcommunications between the various gateways. In other words, multiplevalues might be stored at each intersection point in the matrix. Forinstance, pings could be used to calculate the packet loss (PL), latency(LA), and a quality of service value (Q) which is calculated from thecollected pinging data. In this instance, each intersection in thematrix would have an entry of “PL, LA, Q”. Other combinations of datacould also be used in a method and matrix embodying the invention.

The pinging, data collection and calculation of the values shown in thematrix could be done in many different ways. Two alternative methods areillustrated in FIGS. 12A and 12B.

In the method shown in FIG. 12A, pinging occurs in step 1201. Asdiscussed above, this means that each gateway pings the other gatewaysand the results are recorded. In step 1202, the data collected duringthe pinging step is analyzed and used to calculate various qualitymeasures. In step 1203, the quality metrics are stored into the matrix.The matrix can then be used, as discussed below, to make routingdecisions. In step 1204, the method waits for a predetermined delayperiod to elapse. After the delay period has elapsed, the method returnsto step 1201, and the process repeats.

It is necessary to insert a delay into the method to avoid excessivepinging from occurring. The traffic generated by the pinging processtakes up bandwidth that could otherwise be used to carry actual datatraffic. Thus, it is necessary to strike a balance between conductingthe pinging often enough to obtain accurate information and freeing upthe system for actual data traffic.

The alternate method shown in FIG. 12B begin at step 1208 when thepinging process is conducted. Then, in step 1209, the system determineswhether it is time to re-calculate all the quality of service metrics.This presupposes that the matrix will only be updated at specificintervals, rather than each time a pinging process is conducted. If itis not yet time to update the matrix, the method proceeds to step 1210,where a delay period is allowed to elapse. This delay is inserted forthe same reasons discussed above. Once the delay period has elapsed, themethod returns to step 1208 where the pinging process is repeated.

If the result of step 1209 indicates that it is time to recalculate thequality metrics, the method proceeds to step 1211, where thecalculations are performed. The calculated quality metrics are thenstored in the matrix in step 1213, and the method returns to step 1208.In this method, the matrix is not updated as frequently, and there isnot as high a demand for performing the calculations. This can conservevaluable computer resources. In addition, with a method as illustratedin FIG. 12B, there is data from multiple pings between each of thegateways for use in making the calculations, which can be desirabledepending on the calculations being performed.

In either of the methods described above, the data used to calculate thequality metrics could include only the data recorded since the lastcalculations, or additional data recorded before the last set of qualitymetrics were calculated. For instance, pinging could occur every fiveminutes, and the quality metrics could be calculated every five minutes,but each set of calculations could use data recorded over the last hour.

FIG. 13 illustrates a method embodying the invention for selecting andproviding routing information to a gateway making a routing request.This method would typically be performed by the gatekeeper connected toa gateway, or by the routing controller.

In step 1302, a routing request would be received. In step 1304, thesystem would obtain a first potential route. This step could involve allof the considerations discussed above relating to the selection of adestination carrier and/or destination gateway and/or an ISP or routebetween the originating gateway and the destination gateway.

Once the first potential route is determined, in step 1306 the systemwould look up the quality metrics associated with communications betweenthe originating and destination gateways. This would involve consultingthe quality matrix discussed above. One or more quality values in thematrix relating to the first proposed route would be compared to athreshold value in step 1308. If the quality for the first routesatisfies the threshold, the method would proceed to step 1310, and theroute would be provided to the requesting gateway as a potential routefor completion of a call.

If the result of comparison step 1308 indicates that the quality ofservice metrics for the first route do not satisfy the threshold, thenin step 1312 the system would determine if this is the last availableroute for completing the call. If so, the method would proceed to step1314, where the best of the available routes would be determined bycomparing the quality metrics for each of the routes considered thusfar. Then the method would proceed to step 1310, where the bestavailable route would be provided to the requesting gateway.

If the result of step 1312 indicates that there are alternative routesavailable, the method would proceed to step 1316, where the qualitymetrics for the next available route would be compared to the thresholdvalue. The method would then proceed to step 1308 to determine if thethreshold is satisfied.

A method like the one illustrated in FIG. 13 could be used to identifymultiple potential routes for completing a call that all satisfy a basicthreshold level of service. The quality metrics associated with eachroute could then be used to rank the potential routes. Alternatively,the cost associated with each route could be used to rank all routessatisfying the minimum quality of service threshold. In still otheralternative embodiments, a combination of cost and quality could be usedto rank the potential routes. As explained above, the ranked list ofpotential routes could then be provided to the requesting gateway.

As also explained above, in providing a route to a gateway, the routingcontroller may specify either a direct route between the gateways, or aroute that uses an interim gateway to relay data packets between anoriginating and destination gateway. Thus, the step of identifying apotential route in step 1304 could include identifying both directroutes, and indirect routes that pass through one or more interimgateways. When interim gateways are used, the quality metrics for thepath between the originating gateway and the interim gateway and thepath between the interim gateway and the destination gateway would allhave to be considered and somehow combined in the comparison step.

In a system embodying the invention, as shown in FIG. 2, multipledifferent gateways are all routing calls using routing informationprovided by the routing controller 200. The routing information storedin the routing controller includes tables that are developed using themethods described above. The routing table indicates the best availableroutes between any two gateways that are connected to the system. Evenwhen there are multiple routing controllers that are a part of thesystem, all routing controllers normally have the same routing tableinformation. This means that each time a gateway asks for a route to adestination telephone number, the routing information returned to thegateway will be the same, regardless of which gateway made the routingrequest. As will be explained below, in prior art systems, the fact thatall gateways receive the same routing information can lead tounnecessary signaling and looping of call setup requests.

FIG. 14 shows the basic architecture of a system embodying theinvention. As shown therein, the PSTN 115 and/or a long distance carrier117 both deliver calls to a front end switch 450 of the system. Thecalls arrive at the front end switch 450 as basically a request tocomplete a call to the destination telephone 145. The front end switchmust then forward the call on to an available gateway that can convertthe call into digital data packets and place the packets onto theInternet properly addressed to the destination gateway 464. The frontend switch could send the call directly to gateway 1 464, or directly togateway 2 460. Alternatively, the front end switch 450 could send thecall to a second switch 452, and the second switch could then send thecall to gateway 3 463.

Each of the individual gateways can place data traffic onto the Internetusing one or more routes or access points. In the system illustrated inFIG. 14, gateway 1 462 can place traffic onto the Internet using route Cor route D. Gateway 2 460 can place traffic onto the Internet usingroutes A and B. Gateway 3 463 can place traffic onto the Internet usingroutes E and F. At any given point in time, one or more of these routescould become inoperative, or simply degraded in performance to the pointthat making a voice call through the route results in poor call quality.

In prior art systems, when the front end switch 450 receives a callrequest for a call intended for the destination telephone 145 fromeither the PSTN 115 or the long distance carrier 117, the front endswitch would forward the call to one of the gateways so that the callsetup procedures could be carried out. For purposes of explanation,assume that the call request is forwarded to Gateway 1 462. The gatewaywould then make a routing request to the routing controller forinformation about the address of the destination gateway, and the mostpreferable route to use to get the data onto the Internet. Again, forpurposes of explanation, assume that the routing controller respondswith the appropriate address of the destination gateway 464, and withthe information that the best routes, in preferred order, are routes C,then A, and then E.

With this information, gateway 1 462 would first try to set the call upto go to the destination gateway 464 via route C. Assume that forwhatever reason, route C fails. Gateway 1 would then consult the routinginformation again and determine that the next best route is route A.Thus, gateway 1 would forward the call on to gateway 2 460, which iscapable of using route A.

When gateway 2 460 receives the call request, it too will consult therouting controller for routing information. The same information will bereturned to gateway 2 460, indicating that the preferred routes are C,then A, then E. With this information, gateway 2 460 believes that routeC is the best route, so gateway 2 460 would bounce the call request backto gateway 1 462, so that the call could be sent through route C.Gateway 1 would receive back the same call request it just forwarded onto gateway 2. Depending on the intelligence of gateway 1, gateway 1might immediately send a message to gateway 2 indicating that route Ahas already been attempted and that this route failed. Alternatively,gateway 1 might again try to send the call via route C. Again the routewould fail. Either way, the call request would ultimately be bouncedback to gateway 2 with an indication that the call could not be sentthrough route C.

When gateway 2 gets the call request back from gateway 1, it would thenconsult its routing information and determine that the next route to tryis route A. If route A is operable, the call could then be setup betweengateway 2 and the destination gateway 464 via route A. Although thisprocess eventually results in a successful call setup, there isunnecessary call signaling back and forth between gateway 1 and gateway2.

Moreover, if gateway 2 is unable to set up the call through route A,gateway 2 would again consult the routing information it receivedearlier, and gateway 2 would send the call to gateway 3 463 so that thecall can be placed onto the Internet using route E. When gateway 3receives the call request from gateway 2, it too would consult therouting controller and learn that the preferred routes are route C, thenroute A, then route E. With this information, gateway 3 would forwardthe call request back to gateway 1 with instructions to place the callthrough route C, which would fail again. Gateway I would then forwardthe call back to gateway 3. Gateway 3 would then try to complete thatcall using gateway 2 and route A. This too would fail. Finally, gateway3 would send the call out using route E.

Because each of the gateways are using the same touting information,when one or more routes fail, there can be a large amount of unnecessarylooping and message traffic between the gateways as the a call requestis passed back and forth between the gateways until the call is finallyplaced through an operative route. In preferred embodiments of theinvention, special routing procedures are followed to reduce oreliminate unnecessary looping.

In a first embodiment, each of the gateways will know which routes areassociated with each gateway. Alternatively, this information may beprovided by the routing controller as needed. This means that gateway 2would know that gateway 1 uses routes C and D, and that gateway 3 usesroutes E and F. The gateways can then use this information to reduce oreliminate unnecessary looping.

For instance, using the same example as described above, when a callrequest comes in to place a call to destination telephone 145, gateway 1would first try to send the call via route C. When that route fails,gateway 1 would send the call request to gateway 2 so that gateway 2could send the call via route A. In the prior art system, gateway 2would have bounced the call request back to gateway 1 because gateway 2would believe that route C is the best way to route that call. But in asystem embodying the invention, gateway 2 would know that gateway 1 usesroute C. With this knowledge, and knowing that the call request camefrom gateway 1, gateway 2 would conclude that gateway 1 must havealready tried to use route C, and that route C must have failed. Thus,rather than bouncing the call request back to gateway 1, gateway 2 wouldsimply try the next best route, which would be route A. Similar logiccan be used at each of the other gateways to eliminate unnecessarylooping.

In another preferred embodiment, special addressing information can beincluded in the messages passing back and forth between the gateways.For instance, and again with reference to the same example describedabove, assume that gateway 1 first gets a call request to complete acall to destination telephone 145. Gateway. 1 would try to send the callvia route C, and route C would fail. At this point, gateway 1 would knowthat the next best route is route A. In this embodiment, before sendingthe call request on to gateway 2, gateway 1 could encode a specialaddressing message into the call request. The special addressing messagewould inform gateway 2 that the call request should be sent via aspecific route. In the example, gateway 1 would include addressing codesthat indicate that the call request should be sent via route A, sincethat is the next best route.

When gateway 2 receives the call request, it would read the specialrouting information and immediately know that the call should be sentvia route A. If route A is operable, the call will immediately be sentout using route A. If route A is not available, gateway 2 would consultthe routing controller and determine that the next route to try is routeE. Gateway 2 would then send the call request on to gateway 3 withspecial addressing information that tells gateway 3 to immediately tryto place the call using route E. In this manner, unnecessary looping canbe eliminated.

The foregoing embodiments and advantages are merely exemplary and arenot to be construed as limiting the present invention. The presentteaching can be readily applied to other types of apparatuses. Thedescription of the present invention is intended to be illustrative, andnot to limit the scope of the claims. Many alternatives, modifications,and variations will be apparent to those skilled in the art. In theclaims, means-plus-function clauses are intended to cover the structuresdescribed herein as performing the recited function and not onlystructural equivalents but also equivalent structures.

1. (canceled)
 2. A method of determining the quality of service forcommunications passing between pairs of a plurality of gatewaysconnected to a network, comprising: (a) causing each of the plurality ofgateways to ping the other gateways; (b) recording the results of step(a); (c) calculating quality of service values indicative of a qualityof service for communications between each respective pair of theplurality of gateways using the results recorded in step (b); (d)waiting for a delay period to elapse; (e) repeating steps (a)-(d) toperiodically update the quality of service values.
 3. The method ofclaim 2, wherein in step (c), a single type quality of service value iscalculated for communications passing between each respective pair ofthe plurality of gateways.
 4. The method of claim 2, wherein in step(c), a plurality of different quality of service values are calculatedfor communications passing between each respective pair of the pluralityof gateways.
 5. The method of claim 2, wherein during successiverepetitions of steps (a)-(d), during the calculation step, the resultsrecorded in the current repetition of step (b) are used in conjunctionwith the results of at least one previous repetition of steps (a)-(c) tocalculate new quality of service values for communications passingbetween each respective pair of the plurality of gateways.
 6. The methodof claim 5, wherein the calculated quality of service values arerepresentative of a historical quality of service for communicationspassing between each respective pair of the plurality of gateways. 7.The method of claim 5, wherein during successive repetitions of steps(a)-(d), during the calculation step, the results recorded in thecurrent repetition of step (b) are used in conjunction with the resultsfrom previous repetitions of steps (a)-(c) occurring over apredetermined period of time to calculate new quality of service valuesfor communications passing between each respective pair of the pluralityof gateways.
 8. The method of claim 7, wherein the predetermined periodof time is a day.
 9. The method of claim 7, wherein the predeterminedperiod of time is a week.
 10. The method of claim 7, wherein thepredetermined period of time is more than two weeks.
 11. The method ofclaim 7, wherein a plurality of different quality of service values arecalculated for communications passing between each respective pair ofthe plurality of gateways.
 12. The method of claim 7, wherein duringeach successive repetition of steps (a)-(d), the calculation stepcomprises: using the results recorded in the current repetition of step(b) in conjunction with the results from previous repetitions of steps(a)-(c) occurring over a first predetermined period of time to calculatea first set of new quality of service values indicative of thehistorical quality of service for communications passing between eachrespective pair of the plurality of gateways during the firstpredetermined period of time; and using the results recorded in thecurrent repetition of step (b) in conjunction with the results fromprevious repetitions of steps (a)-(c) occurring over a secondpredetermined period of time to calculate a second set of new quality ofservice values indicative of the historical quality of service forcommunications passing between each respective pair of the plurality ofgateways during the second predetermined period of time, wherein thesecond predetermined period of time is longer than the firstpredetermined period of time.
 13. The method of claim 12, wherein aplurality of different quality of service values are calculated forcommunications passing between each respective pair of the plurality ofgateways.
 14. A method of determining the quality of service forcommunications passing between pairs of a plurality of gatewaysconnected to a network, comprising: (a) causing each of the plurality ofgateways to send test communications to each of the other gateways; (b)recording at least one aspect of the communications passing between eachrespective pair of the plurality of gateways; (c) calculating quality ofservice values indicative of a quality of service for communicationsbetween each respective pair of the plurality of gateways using theresults recorded in step (b); (d) waiting for a delay period to elapse;(e) repeating steps (a)-(d) a plurality of times over a predeterminedperiod of time.
 15. The method of claim 14, wherein in step (c), asingle type quality of service value is calculated for communicationspassing between each respective pair of the plurality of gateways. 16.The method of claim 14, wherein in step (b) multiple different aspectsof the communications passing between each respective pair of thegateways is recorded, and wherein in step (c), a plurality of differentquality of service values are calculated for communications passingbetween each respective pair of the plurality of gateways.
 17. Themethod of claim 14, wherein during successive repetitions of steps(a)-(d), during the calculation step, the results recorded in thecurrent repetition of step (b) are used in conjunction with the resultsof at least one previous repetition of steps (a)-(c) to calculate newquality of service values for communications passing between eachrespective pair of the plurality of gateways.
 18. The method of claim17, wherein the calculated quality of service values are representativeof a historical quality of service for communications passing betweeneach respective pair of the plurality of gateways.
 19. The method ofclaim 17, wherein during successive repetitions of steps (a)-(d), duringthe calculation step, the results recorded in the current repetition ofstep (b) are used in conjunction with the results from previousrepetitions of steps (a)-(c) occurring over a predetermined period oftime to calculate new quality of service values for communicationspassing between each respective pair of the plurality of gateways. 20.The method of claim 19, wherein a plurality of different quality ofservice values are calculated for communications passing between eachrespective pair of the plurality of gateways.
 21. The method of claim19, wherein during each successive repetition of steps (a)-(d), thecalculation step comprises: using the results recorded in the currentrepetition of step (b) in conjunction with the results from previousrepetitions of steps (a)-(c) occurring over a first predetermined periodof time to calculate a first set of new quality of service valuesindicative of the historical quality of service for communicationspassing between each respective pair of the plurality of gateways duringthe first predetermined period of time; and using the results recordedin the current repetition of step (b) in conjunction with the resultsfrom previous repetitions of steps (a)-(c) occurring over a secondpredetermined period of time to calculate a second set of new quality ofservice values indicative of the historical quality of service forcommunications passing between each respective pair of the plurality ofgateways during the second predetermined period of time, wherein thesecond predetermined period of time is longer than the firstpredetermined period of time.